<template>
  <el-pagination
    @size-change="handlePage(true)"
    @current-change="handlePage(false)"
    :current-page.sync="page.current"
    :page-size.sync="page.size"
    :page-sizes="[3,5,10]"
    align="center"
    background
    layout="prev, pager, next,sizes,total"
    :total="page.total"
  >
  </el-pagination>
</template>

<script>
export default {
  name: 'Page',
  props: ['page'],
  methods:{
    handlePage(flag) {
        this.$emit('handlePage',flag)
    }
  }
}
</script>

<style scoped>

</style>
